//
//  AvaliableCouponModel.h
//  FD
//
//  Created by xiaofang wang on 2018/11/10.
//  Copyright © 2018年 ZhiYuan Network. All rights reserved.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface AvaliableCouponModel : NSObject
/**1.图片 拼接图片前缀*/
@property (nonatomic, strong) NSString *thumbnail;

/**2.优惠券额度*/
@property (nonatomic, strong) NSNumber *money;
/**3.优惠券额度类别 0：按金额优惠 1：按百分比优惠 */
@property (nonatomic, strong) NSNumber *moneyType;
/**4.过期时间 时间戳 NSNumber 2018-10-15*/
@property (nonatomic, strong) NSNumber *quietDate;
/**4-2 有效期 时间戳 NSNumber 2018-10-13*/
@property (nonatomic, strong) NSNumber *activeDate;

/**5.优惠券使用限制 满足该金额限制后才可使用，若为-1，则无限制 */
@property (nonatomic, strong) NSNumber *moneyLimit;
/**7.标题*/
@property (nonatomic, copy) NSString *title;
/**8.优惠券id 单独转*/
@property (nonatomic, strong) NSNumber *couponId;

/**限制商品 改字段可能有,可能没有*/
@property (nonatomic, strong) NSDictionary *rule;
/**限制商品goods 改字段可能有,可能没有*/
@property (nonatomic, strong) NSArray *ruleGoodsArr;
@end

NS_ASSUME_NONNULL_END
#pragma mark - 没有 rule
/**
 {
 "coupon":{
 "thumbnail":"public/a237abff29c14365acddbab58a3ea565",
 "money":0.7,
 "moneyType":1,
 "activeDate":1546272000000,
 "moneyLimit":-1,
 "id":36,
 "quietDate":1548864000000,
 "title":"不限金额，7折，全品类，百分比"
 },
 "id":36
 }
 */

#pragma mark - 有 rule
/**
 {
 "coupon":{
 "thumbnail":"public/a237abff29c14365acddbab58a3ea565",
 "money":0.8,
 "moneyType":1,
 "activeDate":1546272000000,
 "rule":{
 "goods":[
 189,
 188
 ]
 },
 "moneyLimit":12,
 "id":38,
 "quietDate":1548864000000,
 "title":"12-8折，限品类，百分比"
 },
 "id":38
 }
 */
